#ifndef SKIN_H
#define SKIN_H

#include "includes.h"


/**
 * Proxy class to handle card skins. Allows to:
 * - Skins listing with proper names
 * - Skins "loading" (only loads name, properties and path)
 * - Proxying each card file path: skin path if it exists, default path else
 */
class Skin : public QObject {
	Q_OBJECT
public:
	static QHash<QString,QString> skins();
	static Skin* fromPath(QString path);
	static Skin* fromDefault();
	
	QString imageUrlNormal(QString basename);
	QString imageUrlThumb(QString basename);
	QString imageUrlCardBackNormal();
	QString imageUrlCardBackThumb();
	QString imageUrlCoupFourre();
	
	QString getName();

private:
	explicit Skin(QString name, QString extension, QString path);
	
	QString name;
	QString extension;
	QString path;
	
	QString imageUrl(QString basename, QString append = "");
};

#endif // SKIN_H
